﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WhatCatch.Core2.Model
{
    /// <summary>
    /// 抓取任务
    /// </summary>
    public class CatchTask
    {
        public long TaskId { get; set; }
        public string Url { get; set; }
        public long ResourceId { get; set; }
        /// <summary>
        /// 1列表页 2明细页
        /// </summary>
        public int HandleType { get; set; }
        public ResourceConfig Config { get; set; }

    }
    public class ResourceConfig
    {
        /// <summary>
        /// 列表位置xpath
        /// </summary>
        public string ListXPath { get; set; }
        /// <summary>
        /// 列表项xpath
        /// </summary>
        public string ListItemXPath { get; set; }
        /// <summary>
        /// 列表项url位置xpath
        /// </summary>
        public string ListItemUrlXPath { get; set; }
        /// <summary>
        /// 分页位置xpath
        /// </summary>
        public string PageXPath { get; set; }
        /// <summary>
        /// 分页项xpath
        /// </summary>
        public string PageItemXPath { get; set; }
        /// <summary>
        /// 分页项url位置xpath
        /// </summary>
        public string PageItemUrlXPath { get; set; }
        /// <summary>
        /// 明细位置xpath
        /// </summary>
        public string DetailXPath { get; set; }
        /// <summary>
        /// 明细标题xpath
        /// </summary>
        public string DetailTitleXPath { get; set; }
    }
}
